package com.example.logindemo2.utils

import android.app.AlertDialog

fun String.showSuccDialog() {
    showDialog("提示", this)
}

fun String.showFailDialog() {
    showDialog("错误提示", this)
}

fun showDialog(title: String, message: String, cancelable: Boolean = false) {
    AlertDialog.Builder(AppManager.instance.getTopActivity()).apply {
        setTitle(title)
        setMessage(message)
        setCancelable(cancelable)
        setPositiveButton("确定") { dialog, which ->
        }
        show()
    }
}
